package com.yq.cns.adapter.newsitem

import com.chad.library.adapter.base.provider.BaseItemProvider
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.yq.cns.R
import com.yq.cns.entity.ListItemType
import com.yq.cns.entity.NewsListEntity

class TextNewsItemProvider : BaseItemProvider<NewsListEntity>() {
    override val itemViewType: Int
        get() = ListItemType.TYPE_TEXT
    override val layoutId: Int
        get() = R.layout.news_item_text

    override fun convert(helper: BaseViewHolder, item: NewsListEntity) {
        helper.setText(R.id.tvTitle, item.title)
    }
}